package javabase.schoolwork.day6_5;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;

/**
 * @author fance
 * @date 18-6-4 下午1:11
 */
public class Client {
    public static void main(String[] args) {
        /*String[] teachers = {"lala","goudan","haha"};
        String[] res = RandomTeacher.getRandomTeachers(teachers,2);
        for (int i = 0; i < res.length; i++) {
            System.out.println(res[i]);
        }*/


      /*  javabase.schoolwork.day6_4.Account[] accounts = new javabase.schoolwork.day6_4.Account[10];
        for (int i = 0; i < 10; i++) {
            accounts[i] = new Account(i + "","女",i * 10 + "","信用卡",i * 100);
        }
        Arrays.sort(accounts, (o1,o2) -> (int) (o1.getMoney() - o2.getMoney()));
        *//*new Comparator<Account>() {
            @Override
            public int compare(Account o1, Account o2) {
                return (int) (o1.getMoney() - o2.getMoney());
            }
        }*/
       /* for (int i = 0; i < accounts.length; i++) {
            System.out.println(accounts[i]);
        }*/


        List<Student> studentList = Arrays.asList(new Student("a",20,90),
                new Student("b",20,90),
        new Student("c",22,90),
        new Student("d",20,70),
                new Student("e",22,100));

        Collections.sort(studentList,new StudentComparator());
        for (Student student : studentList) {
            System.out.println(student);
        }
    }
}
